/**
  * Author: Mei
  * Date: 2020-12-13 15:11
  * Description:
  *
  */
#include "../head.h"

using namespace std;

//类型表
template<typename T>
class TypeTb1 {
public:
    typedef T value_type;
    typedef T *pointer;
    typedef T &reference;

};

template<typename T>
class Num : public TypeTb1<T> {

};

//void Tfunction(Num<int>::value_type x, Num<int>::pointer y, Num<int>::reference z) {
//    cout << "x = " << x << endl;
//    cout << "y = " << *y << endl;
//    cout << "z = " << z << endl;
//}
//把测试函数也写成模板  后面就可以更改模板类型 不一定都是Num类型
template<typename T>
void Tfunction(typename T::value_type x, typename T::pointer y, typename T::reference z) {
    cout << "x = " << x << endl;
    cout << "y = " << *y << endl;
    cout << "z = " << z << endl;
}

int main() {
    typename Num<int>::value_type a = 100;
    Tfunction<Num<int>>(a, &a, a);


    return 0;
}